package com.example.demo.Thread;

import java.util.ArrayList;
import java.util.List;

/**
 * @Description
 * @Author
 * @Date 2020/2/27 14:57
 **/
public class RunnableTest implements Runnable{

    @Override
    public void run() {

        Util util = Util.getUtil();
        for (int i = 0; i < 100; i++) {
            List<String> list = new ArrayList<>();
            util.set(Thread.currentThread().getName()+i);
            list.addAll(util.get());
            System.out.println(Thread.currentThread().getName()+":"+list);
        }
    }

}
